#ifdef USE_ETH_CLIENT
//
// Created by gastonfeng on 2022/11/22.
//

#include "ethClient.h"

#if defined(USE_LWIP)
uint16_t ethClient::localPort() {
    return (_tcp_client->pcb->local_port);
}

IPAddress ethClient::remoteIP() {
    return (IPAddress(_tcp_client->pcb->remote_ip.addr));
}

uint16_t ethClient::remotePort() {
    return (_tcp_client->pcb->remote_port);
}
#endif

int ethClient::connect(IPAddress ip, uint16_t port) {
    return 0;
}

ethClient::ethClient() = default;

ethClient::ethClient(struct tcp_struct *tcpClient) {

}

uint8_t ethClient::status() {
    return 0;
}

int ethClient::connect(const char *host, uint16_t port) {
    return 0;
}

size_t ethClient::write(const uint8_t *buf, size_t size) {
    return Print::write(buf, size);
}

int ethClient::available() {
    return 0;
}

int ethClient::available_wait(int Delay) {
    return 0;
}

int ethClient::read() {
    return 0;
}

int ethClient::read(uint8_t *buf, size_t size) {
    return Stream::read(buf, size);
}

int ethClient::read_wait(int timeout) {
    return 0;
}

int ethClient::peek() {
    return 0;
}

void ethClient::flush() {
    Print::flush();
}

void ethClient::stop() {

}

uint8_t ethClient::connected() {
    return 0;
}

uint16_t ethClient::remotePort() {
    return 0;
}

IPAddress ethClient::remoteIP() {
    return IPAddress();
}

uint16_t ethClient::localPort() {
    return 0;
}

size_t ethClient::write(uint8_t) {
    return 0;
}

ethClient::ethClient(uint8_t sock) {

}

ethClient::operator bool() {
    return false;
}

bool ethClient::operator==(const ethClient &) {
    return false;
}

ethClient::~ethClient() = default;
#endif
